/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.sourceforge.slcwsn.event;

import com.google.code.xbeejavaapi.api.XBee;
import java.util.HashSet;
import java.util.Set;
import net.sourceforge.slcwsn.network.Network;
import net.sourceforge.slcwsn.sensors.Sensor;
import org.apache.log4j.Logger;

/**
 *
 * @author David Miguel Antunes <davidmiguel [ at ] antunes.net>
 */
public abstract class SensorMessageEvent extends Event {

    private static final Logger logger = Logger.getLogger(SensorMessageEvent.class);
    protected Set<XBee> detectedBy = new HashSet<XBee>();
    protected long sensorMessageEventSequenceNumber;
    protected Sensor sensor;

    public SensorMessageEvent(long timestamp, Sensor sensor, Network network, long sensorEventSequenceNumber) {
        super(timestamp, network);
        this.sensorMessageEventSequenceNumber = sensorEventSequenceNumber;
        this.sensor = sensor;
    }

    public Set<XBee> getDetectedBy() {
        return detectedBy;
    }

    public long getSensorEventSequenceNumber() {
        return sensorMessageEventSequenceNumber;
    }

    public Sensor getSensor() {
        return sensor;
    }
}
